import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Auth from '@/components/auth'
import Login from '@/components/login'

import Content from '@/components/content'
import RightSideOne from '@/components/right_side_one'
import RightSideTwo from '@/components/right_side_two'
import RightSideThree from '@/components/right_side_three'
import RightSideFour from '@/components/right_side_four'
import RightSideFive from '@/components/right_side_five'

import Home from '@/home'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      component: Login
    },
    {
      path: '/auth',
      component: Auth
    },
    {
      path: '/',
      component: Home,
      children: [
        {
          // 这里默认的是content
          name: '',
          path: '',
          component: Content,
          children: [
            {
              name: 'right-side-one:',
              // path: '' || 'right-side-one',
              path: '',
              component: RightSideOne
            },
            {
              name: 'right-side-two',
              path: 'right-side-two',
              component: RightSideTwo
            },
            {
              name: 'right-side-three',
              path: 'right-side-three',
              component: RightSideThree
            },
            {
              name: 'right-side-four',
              path: 'right-side-four',
              component: RightSideFour
            },
            {
              name: 'right-side-five',
              path: 'right-side-five',
              component: RightSideFive
            }
          ]
        },
        {
          name: 'helloworld',
          path: 'helloworld',
          component: HelloWorld
        }
      ]
    }
  ]
})
